<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>test</title>
</head>
<body>
<h1>我是标题:<span class="s"></span></h1>
<input type="text" id="i1">
<input type="text" id="i2">
<button onclick="f1">按钮</button>
<script>
    function f1(){
        let inputE1=document.querySelector('#i1');
        console.log(inputE1);
        var x=inputE1.value;
        console.log(x,typeof  x);
        console.log(parseFloat(x));
    }
    let spanE=document.querySelector('.s');
    console.log(spanE);
    spanE.innerHTML='我是span';
    let inputE1=document.querySelector('#i1');
    console.log(inputE1);
    let inputE2=document.getElementById('i2');
    console.log(inputE2);
</script>
</body>
</html>